package com.module.retrofit.api;

import com.module.my.IRxNet;

import java.util.Map;

import io.reactivex.Observable;
import retrofit2.Call;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;

/**
 * Created by dell on 2017/2/16
 */

public interface ApiService {
    /**动态添加head*/
//    Call<ResponseBody> query(@Header("Accept-Language") String lang);

    /**
     * 静态添加head
     */
//    @Headers({
//            "X-Foo: Bar",
//            "X-Ping: Pong"
//    })
    @GET("city")
    Call<String> getCitys();

    //登录
    @FormUrlEncoded
    @POST("https://api.900sui.cn/v1/u/user/login")
    Observable<String> login(@FieldMap Map<String, String> fields);

    //登录
    @FormUrlEncoded
    @POST("https://api.900sui.cn/v1/u/user/login")
    IRxNet login2(@FieldMap Map<String, String> fields);


}
